/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package br.uniceub.sisapeti;

import br.uniceub.sisapeti.persistence.Entity;
import java.util.ArrayList;

/**
 *
 * @author PedroHugo
 * @param <T>
 */
public class AutoIncrementArrayList<T extends Entity> extends ArrayList<T> {
    
    @Override
    public boolean add(T e) {
        
        e.setId(size() + 1);
        
        return super.add(e);
    }
}
